Rules for integrands of the form (((d Sec[e+f x]))^n) (((a+b Sec[e+f x]))^m)

1:  ∫(a+b Sec[e+f x]) (((d Sec[e+f x]))^n)dx

Derivation: Algebraic expansion

Basis: a+b z==a+(b/d)(d z)

Rule:

∫(a+b Sec[e+f x]) (((d Sec[e+f x]))^n)dx  ⟶  a∫(((d Sec[e+f x]))^n)dx+(b/d)∫(((d Sec[e+f x]))^(n+1))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  a*Int[(d*Csc[e+f*x])^n,x] + b/d*Int[(d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,d,e,f,n},x]

2:  ∫(((a+b Sec[e+f x]))^2) (((d Sec[e+f x]))^n)dx

Derivation: Algebraic expansion

Basis: (((a+b z))^2)==2 a b z+(a^2)+(b^2) (z^2)

Rule:

∫(((a+b Sec[e+f x]))^2)(((d Sec[e+f x]))^n)dx  ⟶  ((2 a b)/d)∫(((d Sec[e+f x]))^(n+1))dx+∫(((d Sec[e+f x]))^n) ((a^2)+(b^2) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^2*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  2*a*b/d*Int[(d*Csc[e+f*x])^(n+1),x] + Int[(d*Csc[e+f*x])^n*(a^2+b^2*Csc[e+f*x]^2),x] /;
FreeQ[{a,b,d,e,f,n},x]

3:  ∫(((Sec[e+f x])^2)/(a+b Sec[e+f x]))dx

Derivation: Algebraic expansion

Basis: (z/(a+b z))==(1/b)-(a/(b (a+b z)))

Rule:

∫(((Sec[e+f x])^2)/(a+b Sec[e+f x]))dx  ⟶  (1/b)∫Sec[e+f x]dx-(a/b)∫((Sec[e+f x])/(a+b Sec[e+f x]))dx

Program code:

Int[csc[e_.+f_.*x_]^2/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  1/b*Int[Csc[e+f*x],x] - a/b*Int[Csc[e+f*x]/(a+b*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x]

4:  ∫(((Sec[e+f x])^3)/(a+b Sec[e+f x]))dx

Derivation: Algebraic expansion

Basis: (z/(a+b z))==(1/b)-(a/(b (a+b z)))

Rule:

∫(((Sec[e+f x])^3)/(a+b Sec[e+f x]))dx  ⟶  ((Tan[e+f x])/(b f))-(a/b)∫(((Sec[e+f x])^2)/(a+b Sec[e+f x]))dx

Program code:

Int[csc[e_.+f_.*x_]^3/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -Cot[e+f*x]/(b*f) - a/b*Int[Csc[e+f*x]^2/(a+b*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x]

5.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ]), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  ∫ExpandTrig[(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n),x]dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[ExpandTrig[(a+b*csc[e+f*x])^m*(d*csc[e+f*x])^n,x],x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && IGtQ[m,0] && RationalQ[n]

2.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0

1.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m>0

1:  ∫Sec[e+f x] (Sqrt[a+b Sec[e+f x]])dx  when  (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 1b with A->c,B->d,m->(1/2),n->-1,p->0

Rule: If  (a^2)-(b^2)==0, then

∫Sec[e+f x] (Sqrt[a+b Sec[e+f x]])dx  ⟶  ((2 b Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]])))

Program code:

Int[csc[e_.+f_.*x_]*Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*b*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]) /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0]

2:  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m>(1/2)

Derivation: Singly degenerate secant recurrence 1b with n->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m>(1/2), then

∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  ⟶  
((b Tan[e+f x] (((a+b Sec[e+f x]))^(m-1)))/(f m))+((a (2 m-1))/m)∫Sec[e+f x] (((a+b Sec[e+f x]))^(m-1))dx

Program code:

Int[csc[e_.+f_.*x_]*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -b*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)/(f*m) + a*(2*m-1)/m*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m-1),x] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0] && GtQ[m,1/2] && IntegerQ[2*m]

2.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m<0

1:  ∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 2a with A->1,B->0,m->-1,n->0,p->0

Rule: If  (a^2)-(b^2)==0, then

∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  ⟶  ((Tan[e+f x])/(f (b+a Sec[e+f x])))

Program code:

Int[csc[e_.+f_.*x_]/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -Cot[e+f*x]/(f*(b+a*Csc[e+f*x])) /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0]

2:  ∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

Author: Martin on sci.math.symbolic on 10 March 2011

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then ((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))==(2/f) Subst[(1/(2a+(x^2))),x,((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))](∂_x)((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))

Rule: If  (a^2)-(b^2)==0, then

∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (2/f) Subst[∫(1/(2a+(x^2)))dx,x,((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))]

Program code:

Int[csc[e_.+f_.*x_]/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2/f*Subst[Int[1/(2*a+x^2),x],x,b*Cot[e+f*x]/Sqrt[a+b*Csc[e+f*x]]] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0]

3:  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m<-(1/2)

Derivation: Singly degenerate secant recurrence 2b with n->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m<-(1/2), then

∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  ⟶  
-((b Tan[e+f x] (((a+b Sec[e+f x]))^m))/(a f (2 m+1)))+((m+1)/(a (2 m+1)))∫Sec[e+f x] (((a+b Sec[e+f x]))^(m+1))dx

Program code:

Int[csc[e_.+f_.*x_]*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  b*Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(a*f*(2*m+1)) + (m+1)/(a*(2*m+1))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1),x] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1/2] && IntegerQ[2*m]

3.  ∫((Sec[e+f x])^2) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0

1:  ∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m<-(1/2)

Derivation: Singly degenerate secant recurrence 2a with A->c,B->d,n->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m<-(1/2), then

∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  ⟶  (( Tan[e+f x](((a+b Sec[e+f x]))^m))/(f (2m+1)))+(m/(b(2m+1)))∫Sec[e+f x](((a+b Sec[e+f x]))^(m+1))dx

Program code:

Int[csc[e_.+f_.*x_]^2*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(f*(2*m+1)) + 
  m/(b*(2*m+1))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1),x] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1/2]

2:  ∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m≮-(1/2)

Derivation: Singly degenerate secant recurrence 2c with A->c,B->d,n->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m≮-(1/2) , then

∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  ⟶  ((Tan[e+f x](((a+b Sec[e+f x]))^m))/(f(m+1)))+((a m)/(b (m+1)))∫ Sec[e+f x](((a+b Sec[e+f x]))^m)dx

Program code:

Int[csc[e_.+f_.*x_]^2*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(f*(m+1)) + 
  a*m/(b*(m+1))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^m,x] /;
FreeQ[{a,b,e,f,m},x] && EqQ[a^2-b^2,0] && Not[LtQ[m,-1/2]]

4.  ∫((Sec[e+f x])^3) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0

1:  ∫((Sec[e+f x])^3) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m<-(1/2)

Derivation: ???

Rule: If  (a^2)-(b^2)==0 ∧ m<-(1/2), then

∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  ⟶  
-((b Tan[e+f x](((a+b Sec[e+f x]))^m))/(a f (2m+1)))-(1/((a^2)(2m+1)))∫Sec[e+f x](((a+b Sec[e+f x]))^(m+1))(a m-b(2m+1)Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^3*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  b*Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(a*f*(2*m+1)) - 
  1/(a^2*(2*m+1))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(a*m-b*(2*m+1)*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1/2]

2:  ∫((Sec[e+f x])^3) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m≮-(1/2)

Derivation: Nondegenerate secant recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m≮-(1/2), then

∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  ⟶  
((Tan[e+f x](((a+b Sec[e+f x]))^(m+1)))/(b f (m+2)))+(1/(b (m+2)))∫Sec[e+f x](((a+b Sec[e+f x]))^m)(b (m+1)-a Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^3*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(b*f*(m+2)) + 
  1/(b*(m+2))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^m*(b*(m+1)-a*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f,m},x] && EqQ[a^2-b^2,0] && Not[LtQ[m,-1/2]]

5.  ∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0

1.  ∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n>0

1.  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  when  (a^2)-(b^2)==0

1:  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  when  (a^2)-(b^2)==0 ∧ ((a d)/b)>0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0 ∧ ((a d)/b)>0, then (Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])==((2 a)/(b f)) (Sqrt[((a d)/b)]) Subst[(1/(Sqrt[1+((x^2)/a)])),x,((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))] (∂_x)((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))

Rule: If  (a^2)-(b^2)==0 ∧ ((a d)/b)>0, then

∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  ⟶  ((2 a)/(b f)) (Sqrt[((a d)/b)]) Subst[∫(1/(Sqrt[1+((x^2)/a)]))dx ,x,((b Tan[e+f x])/(Sqrt[a+b Sec[e+f x]]))]

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*a/(b*f)*Sqrt[a*d/b]*Subst[Int[1/Sqrt[1+x^2/a],x],x,b*Cot[e+f*x]/Sqrt[a+b*Csc[e+f*x]]] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && GtQ[a*d/b,0]

2:  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  when  (a^2)-(b^2)==0 ∧ ((a d)/b)≯0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then (Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])==((2 b d)/f) Subst[(1/(b-d (x^2))),x,((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))] (∂_x)((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))

Rule: If  (a^2)-(b^2)==0 ∧ ((a d)/b)≯0, then

∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  ⟶  ((2b d)/f) Subst[∫(1/(b-d (x^2)))dx ,x,((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))]

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*b*d/f*Subst[Int[1/(b-d*x^2),x],x,b*Cot[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[d*Csc[e+f*x]])] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && Not[GtQ[a*d/b,0]]

2:  ∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n>1

Derivation: Singly degenerate secant recurrence 1b with A->c,B->d,m->(1/2),n->n-1,p->0 and algebraic simplification

Rule: If  (a^2)-(b^2)==0 ∧ n>1, then

∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx ⟶  
((2b d Tan[e+f x] (((d Sec[e+f x]))^(n-1)))/(f (2n-1) (Sqrt[a+b Sec[e+f x]])))+((2 a d (n-1))/(b (2 n-1)))∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^(n-1))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*b*d*Cot[e+f*x]*(d*Csc[e+f*x])^(n-1)/(f*(2*n-1)*Sqrt[a+b*Csc[e+f*x]]) + 
  2*a*d*(n-1)/(b*(2*n-1))*Int[Sqrt[a+b*Csc[e+f*x]]*(d*Csc[e+f*x])^(n-1),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && GtQ[n,1] && IntegerQ[2*n]

2.  ∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n<0

1:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 1a with A->1,B->0,m->(1/2),n->-(3/2),p->0

Derivation: Singly degenerate secant recurrence 1c with A->a,B->b,m->-(1/2),n->-(3/2),p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx  ⟶  ((2 a Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*a*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[d*Csc[e+f*x]]) /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0]

2:  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n<-(1/2)

Derivation: Singly degenerate secant recurrence 1c with A->a,B->b,m->-(1/2),p->0 and algebraic simplification

Rule: If  (a^2)-(b^2)==0 ∧ n<-(1/2), then

∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  ⟶  
-((a Tan[e+f x](((d Sec[e+f x]))^n))/(f n(Sqrt[a+b Sec[e+f x]])))+((a(2 n+1))/(2b d n))∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^(n+1))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  a*Cot[e+f*x]*(d*Csc[e+f*x])^n/(f*n*Sqrt[a+b*Csc[e+f*x]]) + 
  a*(2*n+1)/(2*b*d*n)*Int[Sqrt[a+b*Csc[e+f*x]]*(d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && LtQ[n,-1/2] && IntegerQ[2*n]

3:  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==1

Basis: Tan[e+f x] F[Sec[e+f x]]==(1/f) Subst[((F[x])/x),x,Sec[e+f x]] (∂_x)Sec[e+f x]

Rule: If  (a^2)-(b^2)==0, then

∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  ⟶  -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) ∫(( Tan[e+f x] (((d Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]]))dx

  ⟶  -(((a^2) d Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) Subst[∫((((d x))^(n-1))/(Sqrt[a-b x]))dx,x,Sec[e+f x]]

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  a^2*d*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[a-b*Csc[e+f*x]])*Subst[Int[(d*x)^(n-1)/Sqrt[a-b*x],x],x,Csc[e+f*x]] /;
FreeQ[{a,b,d,e,f,n},x] && EqQ[a^2-b^2,0]

6.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n==0 ∧ 2 m∈ℤ

1.  ∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

1:  ∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0, then ((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))==(((Sqrt[2])(Sqrt[a]))/(b f)) Subst[(1/(Sqrt[1+(x^2)])),x,((b Tan[e+f x])/(a+b Sec[e+f x]))] (∂_x)((b Tan[e+f x])/(a+b Sec[e+f x]))

Rule: If  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0, then

∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (((Sqrt[2]) (Sqrt[a]))/(b f))Subst[∫(1/(Sqrt[1+(x^2)]))dx,x,((b Tan[e+f x])/(a+b Sec[e+f x]))]

Program code:

Int[Sqrt[d_.*csc[e_.+f_.*x_]]/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -Sqrt[2]*Sqrt[a]/(b*f)*Subst[Int[1/Sqrt[1+x^2],x],x,b*Cot[e+f*x]/(a+b*Csc[e+f*x])] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && EqQ[d-a/b,0] && GtQ[a,0]

2:  ∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then ((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))==((2 b d)/(a f)) Subst[(1/(2b-d (x^2))),x,((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[d Sec[e+f x]])))] (∂_x)((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[d Sec[e+f x]])))

Rule: If  (a^2)-(b^2)==0, then

∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  ((2 b d)/(a f)) Subst[∫(1/(2b-d (x^2)))dx,x,((b Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[d Sec[e+f x]])))]

Program code:

Int[Sqrt[d_.*csc[e_.+f_.*x_]]/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*b*d/(a*f)*Subst[Int[1/(2*b-d*x^2),x],x,b*Cot[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[d*Csc[e+f*x]])] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n==0 ∧ m>(1/2)

Derivation: Singly degenerate secant recurrence 1a with A->1,B->0,m->-n-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m+n==0 ∧ m>(1/2), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((a Tan[e+f x] (((a+b Sec[e+f x]))^(m-1)) (((d Sec[e+f x]))^n))/(f m))+((b(2 m-1))/(d m))∫(((a+b Sec[e+f x]))^(m-1)) (((d Sec[e+f x]))^(n+1))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -a*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)*(d*Csc[e+f*x])^n/(f*m) + 
  b*(2*m-1)/(d*m)*Int[(a+b*Csc[e+f*x])^(m-1)*(d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && EqQ[m+n,0] && GtQ[m,1/2] && IntegerQ[2*m]

3:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n==0 ∧ m<-(1/2)

Derivation: Singly degenerate secant recurrence 2b with A->c,B->d,n->-m-2,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m+n==0 ∧ m<-(1/2), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-((b d Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n-1)))/(a f (2 m+1)))+((d(m+1))/(b(2 m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-1))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-1)/(a*f*(2*m+1)) + 
  d*(m+1)/(b*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-1),x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && EqQ[m+n,0] && LtQ[m,-1/2] && IntegerQ[2*m]

7.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n+1==0

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m<-(1/2)

Derivation: Singly degenerate secant recurrence 2b with A->1,B->0,n->-m-2,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m<-(1/2), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n))/(f(2m+1)))+(m/(a(2m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^n)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^n/(f*(2*m+1)) + 
  m/(a*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^n,x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && EqQ[m+n+1,0] && LtQ[m,-1/2]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m≮-(1/2)

Derivation: Singly degenerate secant recurrence 1c with A->1,B->0,m->-n-2,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m≮-(1/2), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n))/(f (m+1)))+((a m)/(b d(m+1)))∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n+1))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^n/(f*(m+1)) + 
  a*m/(b*d*(m+1))*Int[(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && EqQ[m+n+1,0] && Not[LtQ[m,-1/2]]

8.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m>1

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m>1 ∧ n<-1

Derivation: Singly degenerate secant recurrence 1a with A->a,B->b,m->m-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m>1 ∧ n<-1, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-(((b^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^n))/(f n))-
(a/(d n))∫(((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^(n+1))(b (m-2 n-2)-a (m+2 n-1) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  b^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^n/(f*n) - 
  a/(d*n)*Int[(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^(n+1)*(b*(m-2*n-2)-a*(m+2*n-1)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && GtQ[m,1] && (LtQ[n,-1] || EqQ[m,3/2] && EqQ[n,-1/2]) && IntegerQ[2*m]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m>1 ∧ n≮-1 ∧ m+n-1≠0

Derivation: Singly degenerate secant recurrence 1b with A->a,B->b,m->m-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m>1 ∧ n≮-1 ∧ m+n-1≠0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((b^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^n))/(f (m+n-1)))+
(b/(m+n-1))∫(((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^n)(b (m+2 n-1)+a (3 m+2 n-4) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^n/(f*(m+n-1)) + 
  b/(m+n-1)*Int[(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^n*(b*(m+2*n-1)+a*(3*m+2*n-4)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f,n},x] && EqQ[a^2-b^2,0] && GtQ[m,1] && NeQ[m+n-1,0] && IntegerQ[2*m]

9.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m<-1

1.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m<-1 ∧ n>1

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m<-1 ∧ 1<n<2

Derivation: Singly degenerate secant recurrence 2a with A->1,B->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m<-1 ∧ 1<n<2, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-((b d Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n-1)))/(a f (2m+1)))-
(d/(a b (2m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-1)) (a (n-1)-b (m+n) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-1)/(a*f*(2*m+1)) - 
  d/(a*b*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-1)*(a*(n-1)-b*(m+n)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1] && LtQ[1,n,2] && (IntegersQ[2*m,2*n] || IntegerQ[m])

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m<-1 ∧ n>2

Derivation: Singly degenerate secant recurrence 2a with A->c,B->d,n->n-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m<-1 ∧ n>2, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((d^2) Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n-2)))/(f (2 m+1)))+
((d^2)/(a b (2 m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-2)) (b (n-2)+a (m-n+2) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -d^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-2)/(f*(2*m+1)) + 
  d^2/(a*b*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-2)*(b*(n-2)+a*(m-n+2)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1] && GtQ[n,2] && (IntegersQ[2*m,2*n] || IntegerQ[m])

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m<-1 ∧ n≯0

Derivation: Singly degenerate secant recurrence 2b with A->1,B->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m<-1 ∧ n≯0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n))/(f (2 m+1)))+
(1/((a^2) (2 m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^n) (a (2 m+n+1)-b (m+n+1) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^n/(f*(2*m+1)) + 
  1/(a^2*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^n*(a*(2*m+n+1)-b*(m+n+1)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f,n},x] && EqQ[a^2-b^2,0] && LtQ[m,-1] && (IntegersQ[2*m,2*n] || IntegerQ[m])

10.  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)==0

1:  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)==0 ∧ n>1

Derivation: Singly degenerate secant recurrence 2a with A->c,B->d,m->-1,n->n-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ n>1, then

∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  ⟶  -(((d^2) Tan[e+f x] (((d Sec[e+f x]))^(n-2)))/(f(a+b Sec[e+f x])))-((d^2)/(a b))∫(((d Sec[e+f x]))^(n-2)) (b (n-2)-a (n-1) Sec[e+f x])dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  d^2*Cot[e+f*x]*(d*Csc[e+f*x])^(n-2)/(f*(a+b*Csc[e+f*x])) - 
  d^2/(a*b)*Int[(d*Csc[e+f*x])^(n-2)*(b*(n-2)-a*(n-1)*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && GtQ[n,1]

2:  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)==0 ∧ n<0

Derivation: Singly degenerate secant recurrence 2b with A->1,B->0,m->-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ n<0, then

∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  ⟶  -((Tan[e+f x](((d Sec[e+f x]))^n))/(f(a+b Sec[e+f x])))-(1/(a^2))∫(((d Sec[e+f x]))^n) (a (n-1)-b n Sec[e+f x])dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  Cot[e+f*x]*(d*Csc[e+f*x])^n/(f*(a+b*Csc[e+f*x])) - 
  1/a^2*Int[(d*Csc[e+f*x])^n*(a*(n-1)-b*n*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && LtQ[n,0]

3:  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 2a with A->1,B->0,m->-1,p->0

Rule: If  (a^2)-(b^2)==0, then

∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  ⟶  ((b d Tan[e+f x] (((d Sec[e+f x]))^(n-1)))/(a f(a+b Sec[e+f x])))+((d (n-1))/(a b))∫(((d Sec[e+f x]))^(n-1)) (a-b Sec[e+f x])dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -b*d*Cot[e+f*x]*(d*Csc[e+f*x])^(n-1)/(a*f*(a+b*Csc[e+f*x])) + 
  d*(n-1)/(a*b)*Int[(d*Csc[e+f*x])^(n-1)*(a-b*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f,n},x] && EqQ[a^2-b^2,0]

11.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

1.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0 ∧ n>1

1:  ∫((((d Sec[e+f x]))^(3/2))/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0

Derivation: Algebraic expansion

Basis:  ((d z)/(Sqrt[a+b z]))==((d(Sqrt[a+b z]))/(b ))-((a d)/(b (Sqrt[a+b z])))

Rule: If  (a^2)-(b^2)==0, then

∫((((d Sec[e+f x]))^(3/2))/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (d/b)∫(Sqrt[a+b Sec[e+f x]])(Sqrt[d Sec[e+f x]])dx-((a d)/b)∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^(3/2)/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  d/b*Int[Sqrt[a+b*Csc[e+f*x]]*Sqrt[d*Csc[e+f*x]],x] - 
  a*d/b*Int[Sqrt[d*Csc[e+f*x]]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0]

2:  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0 ∧ n>2

Derivation: Singly degenerate secant recurrence 2c with A->c,B->d,m->(1/2),n->n-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ n>2, then

∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  
((2(d^2) Tan[e+f x] (((d Sec[e+f x]))^(n-2)))/(f (2n-3)(Sqrt[a+b Sec[e+f x]])))+((d^2)/(b (2n-3)))∫(((((d Sec[e+f x]))^(n-2)) (2b(n-2)-a Sec[e+f x]))/(Sqrt[a+b Sec[e+f x]])) dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*d^2*Cot[e+f*x]*(d*Csc[e+f*x])^(n-2)/(f*(2*n-3)*Sqrt[a+b*Csc[e+f*x]]) + 
  d^2/(b*(2*n-3))*Int[(d*Csc[e+f*x])^(n-2)*(2*b*(n-2)-a*Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && GtQ[n,2] && IntegerQ[2*n]

2:  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)==0 ∧ n<0

Derivation: Singly degenerate secant recurrence 1c with A->1,B->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ n<0, then

∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  -((Tan[e+f x] (((d Sec[e+f x]))^n))/(f n(Sqrt[a+b Sec[e+f x]])))+(1/(2 b d n))∫(((((d Sec[e+f x]))^(n+1)) (a+b(2n+1) Sec[e+f x]))/(Sqrt[a+b Sec[e+f x]])) dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  Cot[e+f*x]*(d*Csc[e+f*x])^n/(f*n*Sqrt[a+b*Csc[e+f*x]]) + 
  1/(2*b*d*n)*Int[(d*Csc[e+f*x])^(n+1)*(a+b*(2*n+1)*Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && LtQ[n,0] && IntegerQ[2*n]

12:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n>2∧ m+n-1≠0

Derivation: Singly degenerate secant recurrence 2c with A->c,B->d,n->n-1,p->0

Rule: If  (a^2)-(b^2)==0 ∧ n>2∧ m+n-1≠0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((d^2) Tan[e+f x] (((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n-2)))/(f (m+n-1)))+((d^2)/(b (m+n-1)))∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n-2)) (b(n-2)+a m Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -d^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-2)/(f*(m+n-1)) + 
  d^2/(b*(m+n-1))*Int[(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-2)*(b*(n-2)+a*m*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f,m},x] && EqQ[a^2-b^2,0] && GtQ[n,2] && NeQ[m+n-1,0] && IntegerQ[n]

13.  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ n∉ℤ ∧ ((a d)/b)>0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) (( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))==1

Basis: If  a>0, then  ((Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) ((((b/a) Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]])) ==-(1/((a^n) f)) Subst[(((((a-x))^(n-1)) (((2 a-x))^(m-(1/2))))/(Sqrt[x])),x,a-b Sec[e+f x]](∂_x)(a-b Sec[e+f x])

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ n∉ℤ ∧ ((a d)/b)>0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  

-(((a^2) (((((a d)/b)))^n) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) ∫(( Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) ((((b/a) Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]]))dx  ⟶  

(((((((a d)/b)))^n) Tan[e+f x])/((a^(n-2)) f (Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) Subst[∫(((((a-x))^(n-1)) (((2 a-x))^(m-(1/2))))/(Sqrt[x]))dx,x,a-b Sec[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -(a*d/b)^n*Cot[e+f*x]/(a^(n-2)*f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[a-b*Csc[e+f*x]])*
    Subst[Int[(a-x)^(n-1)*(2*a-x)^(m-1/2)/Sqrt[x],x],x,a-b*Csc[e+f*x]] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && GtQ[a,0] && Not[IntegerQ[n]] && GtQ[a*d/b,0]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ n∉ℤ ∧ ((a d)/b)<0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) (( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))==1

Basis: If  a>0, then  (( Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((-(b/a) Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]])) ==-(1/((a^n)f)) Subst[(((x^(m-(1/2))) (((a-x))^(n-1)))/(Sqrt[2 a-x])),x,a+b Sec[e+f x]](∂_x)(a+b Sec[e+f x])

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ n∉ℤ ∧ ((a d)/b)<0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  

-(((a^2) (((-((a d)/b)))^n) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]]))) ∫(( Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((-(b/a) Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]]))dx  ⟶  

(((((-((a d)/b)))^n)Tan[e+f x])/((a^(n-1)) f (Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]]))) Subst[∫(((x^(m-(1/2))) (((a-x))^(n-1)))/(Sqrt[2 a-x]))dx,x,a+b Sec[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -(-a*d/b)^n*Cot[e+f*x]/(a^(n-1)*f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[a-b*Csc[e+f*x]])*
    Subst[Int[x^(m-1/2)*(a-x)^(n-1)/Sqrt[2*a-x],x],x,a+b*Csc[e+f*x]] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && GtQ[a,0] && Not[IntegerQ[n]] && LtQ[a*d/b,0]

3:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]])))==1

Basis: Tan[e+f x] F[Sec[e+f x]]==(1/f) Subst[((F[x])/x),x,Sec[e+f x]] (∂_x)Sec[e+f x]

Note: If  a>0, then (((((d x))^(n-1))(((a+b x))^(m-(1/2))))/(Sqrt[a-b x])) is integrable without the need for additional piecewise constant factors.

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  

-(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) ∫(( Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((d Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]]))dx  ⟶  

-(((a^2) d Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]])(Sqrt[a-b Sec[e+f x]]))) Subst[∫(((((d x))^(n-1))(((a+b x))^(m-(1/2))))/(Sqrt[a-b x]))dx,x,Sec[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^2*d*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[a-b*Csc[e+f*x]])*
    Subst[Int[(d*x)^(n-1)*(a+b*x)^(m-1/2)/Sqrt[a-b*x],x],x,Csc[e+f*x]] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && GtQ[a,0]

14:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a≯0

Derivation: Piecewise constant extraction

Basis: If  (∂_x)((((a+b Sec[e+f x]))^m)/(((1+(b/a) Sec[e+f x]))^m))==0

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ n∉ℤ ∧ ((a d)/b)>0 ∧ a≯0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  (((a^(IntPart[m])) (((a+b Sec[e+f x]))^(FracPart[m])))/(((1+(b/a) Sec[e+f x]))^(FracPart[m]))) ∫(((1+(b/a) Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^IntPart[m]*(a+b*Csc[e+f*x])^FracPart[m]/(1+b/a*Csc[e+f*x])^FracPart[m]*Int[(1+b/a*Csc[e+f*x])^m*(d*Csc[e+f*x])^n,x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && Not[GtQ[a,0]]

6.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0

1.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0

1.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m>0

1:  ∫Sec[e+f x] (Sqrt[a+b Sec[e+f x]])dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (Sqrt[a+b z])==((a-b)/(Sqrt[a+b z]))+((b (1+z))/(Sqrt[a+b z]))

Rule: If  (a^2)-(b^2)≠0, then

∫Sec[e+f x] (Sqrt[a+b Sec[e+f x]])dx  ⟶  (a-b)∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx+b∫((Sec[e+f x] (1+Sec[e+f x]))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[csc[e_.+f_.*x_]*Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  (a-b)*Int[Csc[e+f*x]/Sqrt[a+b*Csc[e+f*x]],x] + b*Int[Csc[e+f*x]*(1+Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m>1

Derivation: Cosecant recurrence 1b with c->a c,d->b c+a d,C->b d,m->0,n->n-1

Rule: If  (a^2)-(b^2)≠0 ∧ m>1, then

∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  ⟶  
((b Tan[e+f x](((a+b Sec[e+f x]))^(m-1)))/(f m))+(1/m)∫Sec[e+f x] (((a+b Sec[e+f x]))^(m-2))((b^2) (m-1)+(a^2) m+a b (2 m-1) Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -b*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)/(f*m) + 
  1/m*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m-2)*(b^2*(m-1)+a^2*m+a*b*(2*m-1)*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] && GtQ[m,1] && IntegerQ[2*m]

2.  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m<0

1.  ∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

x:  ∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Integration by substitution

Basis: ((Sec[e+f x])/(a+b Sec[e+f x]))==(2/f)Subst[(1/(a+b-(a-b) (x^2))),x,((Tan[e+f x])/(1+Sec[e+f x]))](∂_x)((Tan[e+f x])/(1+Sec[e+f x]))

Rule: This rule may be preferable to the following one, but will require numerous changes to the test suite.

Rule: If  (a^2)-(b^2)≠0, then

∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  ⟶  (2/f)Subst[∫(1/(a+b-(a-b) (x^2)))dx,x,((Tan[e+f x])/(1+Sec[e+f x]))]

Program code:

(* Int[csc[e_.+f_.*x_]/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -2/f*Subst[Int[1/(a+b-(a-b)*x^2),x],x,Cot[e+f*x]/(1+Csc[e+f*x])] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] *)

1:  ∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic simplification

Basis: (z/(a+b z))==(1/(b(1+(a/b) (z^(-1)))))

Rule: If  (a^2)-(b^2)≠0, then

∫((Sec[e+f x])/(a+b Sec[e+f x]))dx  ⟶  (1/b)∫(1/(1+(a/b) Cos[e+f x]))dx

Program code:

Int[csc[e_.+f_.*x_]/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  1/b*Int[1/(1+a/b*Sin[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((1/(Tan[e+f x])) (Sqrt[((b (1-Sec[e+f x]))/(a+b))]) (Sqrt[-((b (1+Sec[e+f x]))/(a-b))]))==0

Basis: Sec[e+f x] Tan[e+f x] F[Sec[e+f x]]==(1/f) Subst[F[x],x,Sec[e+f x]] (∂_x)Sec[e+f x]

Rule: If  (a^2)-(b^2)≠0, then

∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (1/(Tan[e+f x])) (Sqrt[((b (1-Sec[e+f x]))/(a+b))]) (Sqrt[-((b (1+Sec[e+f x]))/(a-b))]) ∫((Sec[e+f x] Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[(b/(a+b))-((b Sec[e+f x])/(a+b))]) (Sqrt[-(b/(a-b))-((b Sec[e+f x])/(a-b))])))dx

  ⟶  (1/(f Tan[e+f x])) (Sqrt[((b (1-Sec[e+f x]))/(a+b))]) (Sqrt[-((b (1+Sec[e+f x]))/(a-b))]) Subst[∫(1/((Sqrt[a+b x]) (Sqrt[(b/(a+b))-((b x)/(a+b))]) (Sqrt[-(b/(a-b))-((b x)/(a-b))])))dx,x,Sec[e+f x]]

  ⟶  ((2 (Sqrt[a+b]))/(b f Tan[e+f x])) (Sqrt[((b (1-Sec[e+f x]))/(a+b))]) (Sqrt[-((b (1+Sec[e+f x]))/(a-b))]) EllipticF[ArcSin[((Sqrt[a+b Sec[e+f x]])/((Sqrt[a+b]) ))],((a+b)/(a-b))]

Program code:

Int[csc[e_.+f_.*x_]/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*Rt[a+b,2]/(b*f*Cot[e+f*x])*Sqrt[(b*(1-Csc[e+f*x]))/(a+b)]*Sqrt[-b*(1+Csc[e+f*x])/(a-b)]*
    EllipticF[ArcSin[Sqrt[a+b*Csc[e+f*x]]/Rt[a+b,2]],(a+b)/(a-b)] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0]

3:  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m<-1

Derivation: Cosecant recurrence 2b with C->0,m->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1, then

∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  ⟶  
((b Tan[e+f x](((a+b Sec[e+f x]))^(m+1)))/(f (m+1) ((a^2)-(b^2))))+(1/((m+1) ((a^2)-(b^2))))∫Sec[e+f x] (((a+b Sec[e+f x]))^(m+1))(a (m+1)-b (m+2) Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -b*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(f*(m+1)*(a^2-b^2)) + 
  1/((m+1)*(a^2-b^2))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(a*(m+1)-b*(m+2)*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1] && IntegerQ[2*m]

3:  ∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ 2m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)(( Tan[e+f x])/((Sqrt[1+Sec[e+f x]])(Sqrt[1-Sec[e+f x]])))==0

Basis: -(( Tan[e+f x])/((Sqrt[1+Sec[e+f x]])(Sqrt[1-Sec[e+f x]])))(( Tan[e+f x])/((Sqrt[1+Sec[e+f x]])(Sqrt[1-Sec[e+f x]])))==1

Basis: Tan[e+f x] F[Sec[e+f x]]==(1/f) Subst[((F[x])/x),x,Sec[e+f x]] (∂_x)Sec[e+f x]

Rule: If  (a^2)-(b^2)≠0 ∧ 2m∉ℤ, then

∫Sec[e+f x] (((a+b Sec[e+f x]))^m)dx  ⟶  -(( Tan[e+f x])/((Sqrt[1+Sec[e+f x]])(Sqrt[1-Sec[e+f x]]))) ∫(( Tan[e+f x] Sec[e+f x] (((a+b Sec[e+f x]))^m))/((Sqrt[1+Sec[e+f x]]) (Sqrt[1-Sec[e+f x]])))dx

  ⟶  -(( Tan[e+f x])/(f (Sqrt[1+Sec[e+f x]]) (Sqrt[1-Sec[e+f x]]))) Subst[∫((((a+b x))^m)/((Sqrt[1+x]) (Sqrt[1-x])))dx,x,Sec[e+f x]]

Program code:

Int[csc[e_.+f_.*x_]*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
 Cot[e+f*x]/(f*Sqrt[1+Csc[e+f*x]]*Sqrt[1-Csc[e+f*x]])*Subst[Int[(a+b*x)^m/(Sqrt[1+x]*Sqrt[1-x]),x],x,Csc[e+f*x]] /;
FreeQ[{a,b,e,f,m},x] && NeQ[a^2-b^2,0] && Not[IntegerQ[2*m]]

2.  ∫((Sec[e+f x])^2) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0

1:  ∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m>0

Reference: G&R 2.551.1 inverted

Derivation: Nondegenerate secant recurrence 1b with A->a c,B->b c+a d,C->b d,m->0,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m>0, then

∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  ⟶  ((Tan[e+f x](((a+b Sec[e+f x]))^m))/(f (m+1)))+(m/(m+1))∫Sec[e+f x](((a+b Sec[e+f x]))^(m-1))(b+a Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^2*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(f*(m+1)) + 
  m/(m+1)*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m-1)*(b+a*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] && GtQ[m,0]

2:  ∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m<-1

Reference: G&R 2.551.1

Derivation: Nondegenerate secant recurrence 1a with A->c,B->d,C->0,n->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1, then

∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  ⟶  
-((a Tan[e+f x](((a+b Sec[e+f x]))^(m+1)))/(f (m+1) ((a^2)-(b^2))))-(1/((m+1) ((a^2)-(b^2))))∫Sec[e+f x](((a+b Sec[e+f x]))^(m+1))(b(m+1)-a(m+2)Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^2*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  a*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(f*(m+1)*(a^2-b^2)) - 
  1/((m+1)*(a^2-b^2))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(b*(m+1)-a*(m+2)*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1]

3:  ∫(((Sec[e+f x])^2)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Rule: If  (a^2)-(b^2)≠0, then

∫(((Sec[e+f x])^2)/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  -∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx+∫((Sec[e+f x] (1+Sec[e+f x]))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[csc[e_.+f_.*x_]^2/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -Int[Csc[e+f*x]/Sqrt[a+b*Csc[e+f*x]],x] + 
  Int[Csc[e+f*x]*(1+Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0]

4:  ∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (z^2)==-((a z)/b)+(1/b)z(a+b z)

Rule: If  (a^2)-(b^2)≠0, then

∫((Sec[e+f x])^2)(((a+b Sec[e+f x]))^m)dx  ⟶  -(a/b)∫Sec[e+f x](((a+b Sec[e+f x]))^m)dx+(1/b)∫Sec[e+f x](((a+b Sec[e+f x]))^(m+1))dx

Program code:

Int[csc[e_.+f_.*x_]^2*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -a/b*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^m,x] + 1/b*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1),x] /;
FreeQ[{a,b,e,f,m},x] && NeQ[a^2-b^2,0]

3.  ∫((Sec[e+f x])^3) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0

1:  ∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m<-1

Derivation: Nondegenerate secant recurrence 1a with A->(c^2),B->2 c d,C->(d^2),n->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1, then

∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  ⟶  
(((a^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m+1)))/(b f (m+1)((a^2)-(b^2))))+
(1/(b (m+1)((a^2)-(b^2))))∫Sec[e+f x](((a+b Sec[e+f x]))^(m+1)) (a b (m+1)-((a^2)+(b^2) (m+1)) Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^3*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -a^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(b*f*(m+1)*(a^2-b^2)) + 
  1/(b*(m+1)*(a^2-b^2))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*Simp[a*b*(m+1)-(a^2+b^2*(m+1))*Csc[e+f*x],x],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1]

2:  ∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m≮-1

Derivation: Nondegenerate secant recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m≮-1, then

∫((Sec[e+f x])^3)(((a+b Sec[e+f x]))^m)dx  ⟶  
((Tan[e+f x](((a+b Sec[e+f x]))^(m+1)))/(b f (m+2)))+(1/(b (m+2)))∫Sec[e+f x](((a+b Sec[e+f x]))^m)(b(m+1)-a Sec[e+f x])dx

Program code:

Int[csc[e_.+f_.*x_]^3*(a_+b_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(b*f*(m+2)) + 
  1/(b*(m+2))*Int[Csc[e+f*x]*(a+b*Csc[e+f*x])^m*(b*(m+1)-a*Csc[e+f*x]),x] /;
FreeQ[{a,b,e,f,m},x] && NeQ[a^2-b^2,0] && Not[LtQ[m,-1]]

4.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m>2

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m>2 ∧ n<-1

Derivation: Nondegenerate secant recurrence 1a with A->(c^2),B->2 c d,C->(d^2),n->n-2,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m>2 ∧ n<-1, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-(((a^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^n))/(f n))-
(1/(d n))∫(((a+b Sec[e+f x]))^(m-3)) (((d Sec[e+f x]))^(n+1))((a^2) b (m-2 n-2)-a (3 (b^2) n+(a^2) (n+1)) Sec[e+f x]-b ((b^2) n+(a^2) (m+n-1)) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  a^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^n/(f*n) - 
  1/(d*n)*Int[(a+b*Csc[e+f*x])^(m-3)*(d*Csc[e+f*x])^(n+1)*
    Simp[a^2*b*(m-2*n-2)-a*(3*b^2*n+a^2*(n+1))*Csc[e+f*x]-b*(b^2*n+a^2*(m+n-1))*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && GtQ[m,2] && (IntegerQ[m] && LtQ[n,-1] || IntegersQ[m+1/2,2*n] && LeQ[n,-1])

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m>2 ∧ n≮-1

Derivation: Nondegenerate secant recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->m-2,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m>2 ∧ n≮-1, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((b^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^n))/(f (m+n-1)))+
(1/(m+n-1))∫(((a+b Sec[e+f x]))^(m-3)) (((d Sec[e+f x]))^n)·
((a^3)(m+n-1)+a (b^2) n+b ((b^2)(m+n-2)+3 (a^2)(m+n-1)) Sec[e+f x]+a (b^2)(3 m+2 n-4) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^n/(f*(m+n-1)) + 
  1/(d*(m+n-1))*Int[(a+b*Csc[e+f*x])^(m-3)*(d*Csc[e+f*x])^n*
    Simp[a^3*d*(m+n-1)+a*b^2*d*n+b*(b^2*d*(m+n-2)+3*a^2*d*(m+n-1))*Csc[e+f*x]+a*b^2*d*(3*m+2*n-4)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && GtQ[m,2] && (IntegerQ[m] || IntegersQ[2*m,2*n]) && Not[IGtQ[n,2] && Not[IntegerQ[m]]]

5.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m<-1

1.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m<-1 ∧ n>0

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m<-1 ∧ 0<n<1

Derivation: Nondegenerate secant recurrence 1a with A->1,B->0,C->0,p->0

Derivation: Nondegenerate secant recurrence 1c with A->c,B->d,C->0,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1 ∧ 0<n<1, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((b d Tan[e+f x] (((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-1)))/(f (m+1)((a^2)-(b^2))))+
(1/((m+1)((a^2)-(b^2))))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-1))(b d (n-1)+a d (m+1) Sec[e+f x]-b d (m+n+1) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-1)/(f*(m+1)*(a^2-b^2)) + 
  1/((m+1)*(a^2-b^2))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-1)*
    Simp[b*d*(n-1)+a*d*(m+1)*Csc[e+f*x]-b*d*(m+n+1)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1] && LtQ[0,n,1] && IntegersQ[2*m,2*n]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m<-1 ∧ 1<n<2

Derivation: Nondegenerate secant recurrence 1a with A->c,B->d,C->0,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1 ∧ 1<n<2, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-((a (d^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-2)))/(f (m+1)((a^2)-(b^2))))-
((d^2)/((m+1)((a^2)-(b^2))))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^(n-2))(a (n-2)+b (m+1) Sec[e+f x]-a (m+n) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  a*d^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-2)/(f*(m+1)*(a^2-b^2)) - 
  d^2/((m+1)*(a^2-b^2))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-2)*(a*(n-2)+b*(m+1)*Csc[e+f*x]-a*(m+n)*Csc[e+f*x]^2),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1] && LtQ[1,n,2] && IntegersQ[2*m,2*n]

3:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m<-1 ∧ n>3

Derivation: Nondegenerate secant recurrence 1a with A->(c^2),B->2 c d,C->(d^2),n->n-2,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1 ∧ n>3, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((a^2)(d^3) Tan[e+f x](((a+b Sec[e+f x]))^(m+1))(((d Sec[e+f x]))^(n-3)))/(b f (m+1)((a^2)-(b^2))))+
((d^3)/(b (m+1)((a^2)-(b^2))))∫(((a+b Sec[e+f x]))^(m+1))(((d Sec[e+f x]))^(n-3))((a^2) (n-3)+a b (m+1) Sec[e+f x]-((a^2) (n-2)+(b^2) (m+1)) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -a^2*d^3*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-3)/(b*f*(m+1)*(a^2-b^2)) + 
  d^3/(b*(m+1)*(a^2-b^2))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-3)*
    Simp[a^2*(n-3)+a*b*(m+1)*Csc[e+f*x]-(a^2*(n-2)+b^2*(m+1))*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[m,-1] && (IGtQ[n,3] || IntegersQ[n+1/2,2*m] && GtQ[n,2])

2.  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0∧ m<-1 ∧ n≯0

1:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m+(1/2)∈(SuperMinus[ℤ])∧ n∈(SuperMinus[ℤ])

Derivation: Nondegenerate secant recurrence 1c with A->1,B->0,C->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m+(1/2)∈(SuperMinus[ℤ])∧ n∈(SuperMinus[ℤ]), then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-((Tan[e+f x](((a+b Sec[e+f x]))^(m+1))(((d Sec[e+f x]))^n))/(a f n))-
(1/(a d n))∫(((a+b Sec[e+f x]))^m)(((d Sec[e+f x]))^(n+1))(b (m+n+1)-a (n+1) Sec[e+f x]-b (m+n+2) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^n/(a*f*n) - 
  1/(a*d*n)*Int[(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n+1)*
    Simp[b*(m+n+1)-a*(n+1)*Csc[e+f*x]-b*(m+n+2)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && ILtQ[m+1/2,0] && ILtQ[n,0]

2:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0∧ m<-1 ∧ n≯0

Derivation: Nondegenerate secant recurrence 1c with A->1,B->0,C->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ m<-1 ∧ n≯0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
-(((b^2) Tan[e+f x] (((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^n))/(a f(m+1)((a^2)-(b^2))))+
(1/(a(m+1)((a^2)-(b^2))))∫(((a+b Sec[e+f x]))^(m+1)) (((d Sec[e+f x]))^n)·
((a^2) (m+1)-(b^2) (m+n+1)-a b (m+1) Sec[e+f x]+(b^2) (m+n+2) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  b^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^n/(a*f*(m+1)*(a^2-b^2)) + 
  1/(a*(m+1)*(a^2-b^2))*Int[(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^n*
    (a^2*(m+1)-b^2*(m+n+1)-a*b*(m+1)*Csc[e+f*x]+b^2*(m+n+2)*Csc[e+f*x]^2),x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && LtQ[m,-1] && IntegersQ[2*m,2*n]

6.  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

1.  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0 ∧ n>0

1:  ∫((Sqrt[d Sec[e+f x]])/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[d Cos[e+f x]])(Sqrt[d Sec[e+f x]]))==0

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[d Sec[e+f x]])/(a+b Sec[e+f x]))dx  ⟶  (((Sqrt[d Cos[e+f x]]) (Sqrt[d Sec[e+f x]]))/d)∫((Sqrt[d Cos[e+f x]])/(b+a Cos[e+f x]))dx

Program code:

Int[Sqrt[d_.*csc[e_.+f_.*x_]]/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  Sqrt[d*Sin[e+f*x]]*Sqrt[d*Csc[e+f*x]]/d*Int[Sqrt[d*Sin[e+f*x]]/(b+a*Sin[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((((d Sec[e+f x]))^(3/2))/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[d Cos[e+f x]])(Sqrt[d Sec[e+f x]]))==0

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sec[e+f x]))^(3/2))/(a+b Sec[e+f x]))dx  ⟶  d(Sqrt[d Cos[e+f x]])(Sqrt[d Sec[e+f x]])∫(1/((Sqrt[d Cos[e+f x]]) (b+a Cos[e+f x])))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^(3/2)/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  d*Sqrt[d*Sin[e+f*x]]*Sqrt[d*Csc[e+f*x]]*Int[1/(Sqrt[d*Sin[e+f*x]]*(b+a*Sin[e+f*x])),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

3:  ∫((((d Sec[e+f x]))^(5/2))/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: ((d z)/(a+b z))==(d/b)-((a d)/(b(a+b z)))

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sec[e+f x]))^(5/2))/(a+b Sec[e+f x]))dx  ⟶  (d/b)∫(((d Sec[e+f x]))^(3/2))dx-((a d)/b)∫((((d Sec[e+f x]))^(3/2))/(a+b Sec[e+f x]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^(5/2)/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  d/b*Int[(d*Csc[e+f*x])^(3/2),x] - a*d/b*Int[(d*Csc[e+f*x])^(3/2)/(a+b*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

4:  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0 ∧ n>3

Derivation: Nondegenerate secant recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->-3,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ n>3, then

∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  ⟶  
(((d^3) Tan[e+f x] (((d Sec[e+f x]))^(n-3)))/(b f (n-2)))+((d^3)/(b (n-2)))∫(((((d Sec[e+f x]))^(n-3)) (a (n-3)+b (n-3) Sec[e+f x]-a (n-2) ((Sec[e+f x])^2)))/(a+b Sec[e+f x]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -d^3*Cot[e+f*x]*(d*Csc[e+f*x])^(n-3)/(b*f*(n-2)) + 
  d^3/(b*(n-2))*Int[(d*Csc[e+f*x])^(n-3)*Simp[a*(n-3)+b*(n-3)*Csc[e+f*x]-a*(n-2)*Csc[e+f*x]^2,x]/(a+b*Csc[e+f*x]),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && GtQ[n,3]

2.  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0 ∧ n<0

1:  ∫(1/((Sqrt[d Sec[e+f x]])(a+b Sec[e+f x])))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (1/((Sqrt[d z]) (a+b z)))==(((b^2) (((d z))^(3/2)))/((a^2) (d^2) (a+b z)))+((a-b z)/((a^2) (Sqrt[d z])))

Rule: If  (a^2)-(b^2)≠0, then

∫(1/((Sqrt[d Sec[e+f x]])(a+b Sec[e+f x])))dx  ⟶  ((b^2)/((a^2) (d^2)))∫((((d Sec[e+f x]))^(3/2))/(a+b Sec[e+f x]))dx+(1/(a^2))∫((a-b Sec[e+f x])/(Sqrt[d Sec[e+f x]]))dx

Program code:

Int[1/(Sqrt[d_.*csc[e_.+f_.*x_]]*(a_+b_.*csc[e_.+f_.*x_])),x_Symbol] :=
  b^2/(a^2*d^2)*Int[(d*Csc[e+f*x])^(3/2)/(a+b*Csc[e+f*x]),x] + 
  1/a^2*Int[(a-b*Csc[e+f*x])/Sqrt[d*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  when  (a^2)-(b^2)≠0 ∧ n≤-1

Derivation: Nondegenerate secant recurrence 1c with A->1,B->0,C->0,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ n≤-1, then

∫((((d Sec[e+f x]))^n)/(a+b Sec[e+f x]))dx  ⟶  
-((Tan[e+f x](((d Sec[e+f x]))^n))/(a f n))-(1/(a d n))∫(((((d Sec[e+f x]))^(n+1)) (b n-a (n+1) Sec[e+f x]-b (n+1) ((Sec[e+f x])^2)))/(a+b Sec[e+f x]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  Cot[e+f*x]*(d*Csc[e+f*x])^n/(a*f*n) - 
  1/(a*d*n)*Int[(d*Csc[e+f*x])^(n+1)/(a+b*Csc[e+f*x])*
    Simp[b*n-a*(n+1)*Csc[e+f*x]-b*(n+1)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LeQ[n,-1] && IntegerQ[2*n]

7.  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0

1.  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n>0

1:  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (Sqrt[a+b z])==(a/(Sqrt[a+b z]))+((b z)/(Sqrt[a+b z]))

Rule: If  (a^2)-(b^2)≠0, then

∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx  ⟶  a∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx+(b/d)∫((((d Sec[e+f x]))^(3/2))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  a*Int[Sqrt[d*Csc[e+f*x]]/Sqrt[a+b*Csc[e+f*x]],x] + 
  b/d*Int[(d*Csc[e+f*x])^(3/2)/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n>1

Derivation: Secant recurrence 1b with A->0,B->0,C->1,m->m-2,n->(1/2)

Derivation: Secant recurrence 3a with A->0,B->a,C->b,m->m-1,n->-(1/2)

Rule: If  (a^2)-(b^2)≠0 ∧ n>1, then

∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  ⟶  
((2d Sin[e+f x] (Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^(n-1)))/(f (2n-1)))+
((d^2)/(2n-1)) ∫(((((d Sec[e+f x]))^(n-2)) (2a (n-2)+b (2n-3) Sec[e+f x]+a ((Sec[e+f x])^2)))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*d*Cos[e+f*x]*Sqrt[a+b*Csc[e+f*x]]*(d*Csc[e+f*x])^(n-1)/(f*(2*n-1)) + 
  d^2/(2*n-1)*Int[(d*Csc[e+f*x])^(n-2)*Simp[2*a*(n-2)+b*(2*n-3)*Csc[e+f*x]+a*Csc[e+f*x]^2,x]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && GtQ[n,1] && IntegerQ[2*n]

2.  ∫(Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n<0

1:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction

Basis: If  (∂_x)((Sqrt[a+b f[x]])/((Sqrt[d f[x]])(Sqrt[b+a/f[x]])))==0

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx  ⟶  ((Sqrt[a+b Sec[e+f x]])/((Sqrt[d Sec[e+f x]])(Sqrt[b+a Cos[e+f x]])))∫(Sqrt[b+a Cos[e+f x]])dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  Sqrt[a+b*Csc[e+f*x]]/(Sqrt[d*Csc[e+f*x]]*Sqrt[b+a*Sin[e+f*x]])*Int[Sqrt[b+a*Sin[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n≤-1

Derivation: Nondegenerate secant recurrence 1a with A->1,B->0,C->0,p->0

Derivation: Nondegenerate secant recurrence 1c with A->c,B->d,C->0,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ n≤-1, then

∫(Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n)dx  ⟶  
-((Tan[e+f x](Sqrt[a+b Sec[e+f x]]) (((d Sec[e+f x]))^n))/(f n))-
(1/(2d n))∫(((((d Sec[e+f x]))^(n+1)) (b-2a (n+1) Sec[e+f x]-b (2n+3) ((Sec[e+f x])^2)))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Cot[e+f*x]*Sqrt[a+b*Csc[e+f*x]]*(d*Csc[e+f*x])^n/(f*n) - 
  1/(2*d*n)*Int[(d*Csc[e+f*x])^(n+1)*Simp[b-2*a*(n+1)*Csc[e+f*x]-b*(2*n+3)*Csc[e+f*x]^2,x]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LeQ[n,-1] && IntegerQ[2*n]

8.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

1.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ n>0

1:  ∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction

Basis: If (∂_x)(((Sqrt[d f[x]])(Sqrt[b+a ((f[x])^(-1))]))/(Sqrt[a+b f[x]]))==0

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (((Sqrt[d Sec[e+f x]])(Sqrt[b+a Cos[e+f x]]))/(Sqrt[a+b Sec[e+f x]]))∫(1/(Sqrt[b+a Cos[e+f x]]))dx

Program code:

Int[Sqrt[d_.*csc[e_.+f_.*x_]]/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  Sqrt[d*Csc[e+f*x]]*Sqrt[b+a*Sin[e+f*x]]/Sqrt[a+b*Csc[e+f*x]]*Int[1/Sqrt[b+a*Sin[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ n>1

1:  ∫((((d Sec[e+f x]))^(3/2))/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Piecewise constant extraction

Basis: If  (∂_x)(((Sqrt[d f[x]])(Sqrt[b+a/f[x]]))/(Sqrt[a+b f[x]]))==0

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sec[e+f x]))^(3/2))/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  ((d(Sqrt[d Sec[e+f x]])(Sqrt[b+a Cos[e+f x]]))/(Sqrt[a+b Sec[e+f x]]))∫(1/(Cos[e+f x] (Sqrt[b+a Cos[e+f x]])))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^(3/2)/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  d*Sqrt[d*Csc[e+f*x]]*Sqrt[b+a*Sin[e+f*x]]/Sqrt[a+b*Csc[e+f*x]]*Int[1/(Sin[e+f*x]*Sqrt[b+a*Sin[e+f*x]]),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ n>2

Derivation: Secant recurrence 3a with A->0,B->0,C->1,m->m-2,n->-(1/2)

Rule: If  (a^2)-(b^2)≠0 ∧ n>2, then

∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  
((2(d^2)Sin[e+f x](((d Sec[e+f x]))^(n-2))(Sqrt[a+b Sec[e+f x]]))/(b f (2n-3)))+
((d^3)/(b (2n-3)))∫(((((d Sec[e+f x]))^(n-3)) (2a (n-3)+b (2n-5) Sec[e+f x]-2a (n-2) ((Sec[e+f x])^2)))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*d^2*Cos[e+f*x]*(d*Csc[e+f*x])^(n-2)*Sqrt[a+b*Csc[e+f*x]]/(b*f*(2*n-3)) + 
  d^3/(b*(2*n-3))*Int[(d*Csc[e+f*x])^(n-3)/Sqrt[a+b*Csc[e+f*x]]*
     Simp[2*a*(n-3)+b*(2*n-5)*Csc[e+f*x]-2*a*(n-2)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && GtQ[n,2] && IntegerQ[2*n]

2.  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ n<0

1:  ∫(1/(Sec[e+f x](Sqrt[a+b Sec[e+f x]])))dx  when  (a^2)-(b^2)≠0

Derivation: Nondegenerate secant recurrence 1c with A->1,B->0,C->0,p->0

Rule: If  (a^2)-(b^2)≠0, then

∫(1/(Sec[e+f x](Sqrt[a+b Sec[e+f x]])))dx  ⟶  ((Sin[e+f x](Sqrt[a+b Sec[e+f x]]))/(a f))-(b/(2a))∫((1+((Sec[e+f x])^2))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[1/(csc[e_.+f_.*x_]*Sqrt[a_+b_.*csc[e_.+f_.*x_]]),x_Symbol] :=
  -Cos[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/(a*f) - b/(2*a)*Int[(1+Csc[e+f*x]^2)/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (1/((Sqrt[z]) (Sqrt[a+b z])))==((Sqrt[a+b z])/(a (Sqrt[z])))-((b (Sqrt[z]))/(a (Sqrt[a+b z])))

Rule: If  (a^2)-(b^2)≠0, then

∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])))dx  ⟶  (1/a)∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx-(b/(a d))∫((Sqrt[d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[1/(Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[d_.*csc[e_.+f_.*x_]]),x_Symbol] :=
  1/a*Int[Sqrt[a+b*Csc[e+f*x]]/Sqrt[d*Csc[e+f*x]],x] - 
  b/(a*d)*Int[Sqrt[d*Csc[e+f*x]]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

3:  ∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ n<-1

Derivation: Secant recurrence 3b with A->1,B->0,C->0,n->-(1/2)

Rule: If  (a^2)-(b^2)≠0 ∧ n<-1, then

∫((((d Sec[e+f x]))^n)/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  
-((Sin[e+f x](((d Sec[e+f x]))^(n+1))(Sqrt[a+b Sec[e+f x]]))/(a d f n))+
(1/(2a d n))∫(((((d Sec[e+f x]))^(n+1)) (-b (2 n+1)+2 a (n+1) Sec[e+f x]+b (2 n+3) ((Sec[e+f x])^2)))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  Cos[e+f*x]*(d*Csc[e+f*x])^(n+1)*Sqrt[a+b*Csc[e+f*x]]/(a*d*f*n) + 
  1/(2*a*d*n)*Int[(d*Csc[e+f*x])^(n+1)/Sqrt[a+b*Csc[e+f*x]]*
    Simp[-b*(2*n+1)+2*a*(n+1)*Csc[e+f*x]+b*(2*n+3)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[n,-1] && IntegerQ[2*n]

9:  ∫(((a+b Sec[e+f x]))^(3/2)) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n≤-1

Derivation: Nondegenerate secant recurrence 1a with A->c,B->d,C->0,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ n≤-1, then

∫(((a+b Sec[e+f x]))^(3/2)) (((d Sec[e+f x]))^n)dx  ⟶  
-((a Tan[e+f x](Sqrt[a+b Sec[e+f x]])(((d Sec[e+f x]))^n))/(f n))+
(1/(2d n))∫(((((d Sec[e+f x]))^(n+1)) (a b (2n-1)+2((b^2) n+(a^2) (n+1)) Sec[e+f x]+a b (2n+3) ((Sec[e+f x])^2)))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  a*Cot[e+f*x]*Sqrt[a+b*Csc[e+f*x]]*(d*Csc[e+f*x])^n/(f*n) + 
  1/(2*d*n)*Int[(d*Csc[e+f*x])^(n+1)/Sqrt[a+b*Csc[e+f*x]]*
    Simp[a*b*(2*n-1)+2*(b^2*n+a^2*(n+1))*Csc[e+f*x]+a*b*(2*n+3)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LeQ[n,-1] && IntegersQ[2*n]

10:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n>3

Derivation: Nondegenerate secant recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->m-2,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ n>3, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((d^3) Tan[e+f x](((a+b Sec[e+f x]))^(m+1))(((d Sec[e+f x]))^(n-3)))/(b f (m+n-1)))+
((d^3)/(b (m+n-1)))∫(((a+b Sec[e+f x]))^m)(((d Sec[e+f x]))^(n-3))(a (n-3)+b (m+n-2) Sec[e+f x]-a (n-2) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -d^3*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)*(d*Csc[e+f*x])^(n-3)/(b*f*(m+n-1)) + 
  d^3/(b*(m+n-1))*Int[(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-3)*
    Simp[a*(n-3)+b*(m+n-2)*Csc[e+f*x]-a*(n-2)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f,m},x] && NeQ[a^2-b^2,0] && GtQ[n,3] && (IntegerQ[n] || IntegersQ[2*m,2*n]) && Not[IGtQ[m,2]]

11:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ 0<m<2 ∧ 0<n<3 ∧ m+n-1≠0

Derivation: Nondegenerate secant recurrence 1b with A->a c,B->b c+a d,C->b d,m->m-1,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ 0<m<2 ∧ 0<n<3 ∧ m+n-1≠0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
((b d Tan[e+f x] (((a+b Sec[e+f x]))^(m-1)) (((d Sec[e+f x]))^(n-1)))/(f (m+n-1)))+
(d/(m+n-1))∫(((a+b Sec[e+f x]))^(m-2)) (((d Sec[e+f x]))^(n-1))(a b (n-1)+((b^2) (m+n-2)+(a^2) (m+n-1)) Sec[e+f x]+a b (2 m+n-2) ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)*(d*Csc[e+f*x])^(n-1)/(f*(m+n-1)) + 
  d/(m+n-1)*Int[(a+b*Csc[e+f*x])^(m-2)*(d*Csc[e+f*x])^(n-1)*
    Simp[a*b*(n-1)+(b^2*(m+n-2)+a^2*(m+n-1))*Csc[e+f*x]+a*b*(2*m+n-2)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[0,m,2] && LtQ[0,n,3] && NeQ[m+n-1,0] && (IntegerQ[m] || IntegersQ[2*m,2*n])

12:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ -1<m<2 ∧ 1<n<3 ∧ m+n-1≠0

Derivation: Nondegenerate secant recurrence 1b with A->a c,B->b c+a d,C->b d,m->m-1,n->n-1,p->0

Rule: If  (a^2)-(b^2)≠0 ∧ -1<m<2 ∧ 1<n<3 ∧ m+n-1≠0, then

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  
(((d^2) Tan[e+f x](((a+b Sec[e+f x]))^m)(((d Sec[e+f x]))^(n-2)))/(f (m+n-1)))+
((d^2)/(b (m+n-1)))∫(((a+b Sec[e+f x]))^(m-1))(((d Sec[e+f x]))^(n-2))(a b (n-2)+(b^2) (m+n-2) Sec[e+f x]+a b m ((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -d^2*Cot[e+f*x]*(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^(n-2)/(f*(m+n-1)) + 
  d^2/(b*(m+n-1))*Int[(a+b*Csc[e+f*x])^(m-1)*(d*Csc[e+f*x])^(n-2)*
    Simp[a*b*(n-2)+b^2*(m+n-2)*Csc[e+f*x]+a*b*m*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && LtQ[-1,m,2] && LtQ[1,n,3] && NeQ[m+n-1,0] && (IntegerQ[n] || IntegersQ[2*m,2*n])

13:  ∫((((a+b Sec[e+f x]))^(3/2))/(Sqrt[d Sec[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: ((a+b z)/(Sqrt[d z]))==(a/(Sqrt[d z]))+(b/d) (Sqrt[d z])

Rule: If  (a^2)-(b^2)≠0, then

∫((((a+b Sec[e+f x]))^(3/2))/(Sqrt[d Sec[e+f x]]))dx  ⟶  a∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[d Sec[e+f x]]))dx+(b/d)∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[d Sec[e+f x]])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)/Sqrt[d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  a*Int[Sqrt[a+b*Csc[e+f*x]]/Sqrt[d*Csc[e+f*x]],x] + 
  b/d*Int[Sqrt[a+b*Csc[e+f*x]]*Sqrt[d*Csc[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

14:  ∫(((d Sec[e+f x]))^n) (((a+b Sec[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m∈ℤ

Derivation: Piecewise constant extraction and algebraic simplification

Basis: (∂_x)(((Cos[e+f x])^n) (((d Sec[e+f x]))^n))==0

Rule: If  (a^2)-(b^2)≠0 ∧ m∈ℤ, then

∫(((d Sec[e+f x]))^n) (((a+b Sec[e+f x]))^m)dx  ⟶  ((Cos[e+f x])^n) (((d Sec[e+f x]))^n) ∫((((a+b Sec[e+f x]))^m)/((Cos[e+f x])^n))dx

  ⟶  ((Cos[e+f x])^n) (((d Sec[e+f x]))^n) ∫((((b+a Cos[e+f x]))^m)/((Cos[e+f x])^(m+n)))dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^n_.*(a_+b_.*csc[e_.+f_.*x_])^m_.,x_Symbol] :=
  Sin[e+f*x]^n*(d*Csc[e+f*x])^n*Int[(b+a*Sin[e+f*x])^m/Sin[e+f*x]^(m+n),x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && IntegerQ[m]

U:  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx

Rule:

∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx  ⟶  ∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^n)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  Unintegrable[(a+b*Csc[e+f*x])^m*(d*Csc[e+f*x])^n,x] /;
FreeQ[{a,b,d,e,f,m,n},x]

Rules for integrands of the form (((d Cos[e+f x]))^m) (((a+b Sec[e+f x]))^p)

1:  ∫(((d Cos[e+f x]))^m) (((a+b Sec[e+f x]))^p)dx  when  m∉ℤ ∧ p∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Cos[e+f x]))^m) (((((Sec[e+f x])/d)))^m))==0

Rule: If  m∉ℤ ∧ p∉ℤ, then

∫(((d Cos[e+f x]))^m) (((a+b Sec[e+f x]))^p)dx  ⟶  (((d Cos[e+f x]))^(FracPart[m])) (((((Sec[e+f x])/d)))^(FracPart[m])) ∫(((((Sec[e+f x])/d)))^(-m)) (((a+b Sec[e+f x]))^p)dx

Program code:

Int[(d_.*cos[e_.+f_.*x_])^m_*(a_.+b_.*sec[e_.+f_.*x_])^p_,x_Symbol] :=
  (d*Cos[e+f*x])^FracPart[m]*(Sec[e+f*x]/d)^FracPart[m]*Int[(Sec[e+f*x]/d)^(-m)*(a+b*Sec[e+f*x])^p,x] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]] && Not[IntegerQ[p]]